Time to create the bottom block. We'll start by creating a variable for the height.

  • Click on the PYTHON tab. Go to and drag Integer Variable inside the interval() event.
  • Change the name of the variable (the word before the = sign) to bot_height.
  • Change the value (after the = sign) to 350 - top_height.

Now we will always have a gap of 350 pixels to move the bike through.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)